import java.util.ArrayList;

class ArryList {


     public static void main(String[] args) {
        ArrayList list = new ArrayList();
        Student stu = new Student("张三",14);

     }



     public static ArrayList<Student> getList(ArrayList<Student> list){
         ArrayList<Student> newlist= new ArrayList();

         for (int i = 0; i < list.size(); i++) {
             Student stu=list.get(i);
             int age=stu.getAge();
             if (age>18){
                newlist.add(stu);
             }
         }
         return newlist;

     }

     }
